﻿<?php
header('Content-type:text/html;charset=utf-8');
require 'db_sqlite.php';
$filepath = "../data/votedb";
$db = new db_sqlite($filepath);

if (!$db) {
    echo $db->lastErrorMsg();
} else {
    echo "Opened database successfully<br/>";
}
/*
  $db->exec("delete form applay");
  for ($x = 1; $x < 100; $x++) {
  $db->insert('applay', array(
  'id' => $x,
  'name' => 'luomg' . $x,
  'phone' => '1302620900' . $x,
  'photo' => '/upload/1.jpg',
  'vote' => $x));
  }
 */
$sql = "Select * From [applay] ";
$ret = $db->fecthall($sql);
print_r($ret);
?>